/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.test;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import ru.jSkyRoom.interfaces.major.Major;

/**
 *
 * @author Rakev
 */
public class EdidProducer {

    private static EdidProducer instance = new EdidProducer();

    public static EdidProducer create() {
        return instance;
    }

    protected EdidProducer() {
    }

    public <T extends Major> String produce(T from) {
        return from.getEDID();
    }

    public <T extends Major> Collection<String> produce(Collection<T> froms) {
        List<String> result = new ArrayList<String>(froms.size());
        for (T from : froms) {
            result.add(produce(from));
        }

        return result;
    }
}
